﻿@model LeadMaster.Models.LeadStatQuestions

@using (Ajax.BeginForm(
    "CreateStatQuestions", "LeadBuilder", null,
    new AjaxOptions
{
HttpMethod="Post",
UpdateTargetId = "statquestions"
}, new { @id = "formAskStatQuestion" }))
{
    @Html.ValidationSummary(true)
    @Html.HiddenFor(model => model.LeadStatID)
    <fieldset>
    <legend>Create Statutory Question</legend>

<div>
<table class="listtable contactstable" cellspacing="0" cellpadding="0" style="width: 1000px;" id="enquirylist">
    <tr>
    <th style="text-align: left"><label>Question</label></th>
    <td>
    @Html.TextAreaFor(model => model.Question, new { @class = "notes" })
    @Html.ValidationMessageFor(model => model.Question)
    </td>
    </tr>
    <tr>
    <th style="text-align: left"><label>Answer Type</label></th>
    <td>
    @Html.DropDownList("AnswerType")
    Dropdown ? <input type="checkbox" name="DropDown" id="DropDown" value="true"/>
    </td>
    </tr>
    <tr>
    <th style="text-align: left"><label>Character-based or Dropdown List options</label></th>
    <td>@Html.TextAreaFor(model => model.AcceptedAnswerChar, new { @class="notes" })</td>
    </tr>
    <tr>
    <th style="text-align: left"><label>Answer Logic</label></th>
    <td>
        <input type="radio" name="AcceptedAnswerBool" value="true"/>Yes
        <input type="radio" name="AcceptedAnswerBool" value="false"/>No
    </td>
    </tr>
    <tr>
    <th style="text-align: left"><label>Answer Numeric From</label></th>
    <td>@Html.TextBoxFor(model => model.AcceptedAnswerIntFrom)</td>
    </tr>
    <tr>
    <th style="text-align: left"><label>Answer Numeric To</label></th>
    <td>@Html.TextBoxFor(model => model.AcceptedAnswerIntTo)</td>
    </tr>
    <tr>
    <th style="text-align: left"><label>Mandatory</label></th>
    <td>@Html.CheckBoxFor(model => model.Mandatory)</td>
    </tr>
    <tr>
    <th style="text-align: left"><label>Caller script note</label></th>
    <td>
        @Html.TextAreaFor(m => m.Notes, new { @class = "notes" })
    </td>
    </tr>
    <tr>
    <th style="text-align: left"><label>Display Order</label></th>
    <td>@Html.TextBoxFor(model => model.DisplayOrder)</td>
    </tr>
</table>
</div>
</fieldset>
}


<script type="text/javascript">
    $(document).ready(function () {
        $("#answerTypeList").val("C")
        $("#answerTypeList").attr('name', 'AnswerType')
    });
</script>